home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / ARGONET / PD / MATHS / RLAB / RLAB125.ZIP / !RLaB / misc / MAC / config.h next >
C/C++ Source or Header  |  1994-06-26  |  4KB  |  184 lines

  1. /* RLaB system configuration header file. */
  2. /* MAC-RLaB config.h, 6/19/94 */
  3. /* tsyang@ce.berkeley.edu */
  4.  
  5. /*
  6.  * This configuration file contains all the "defines" that 
  7.  * are necessary to compile rlab. If this file, as generated 
  8.  * by configure, does not work, then either "define" or "undef"
  9.  * symbols to generate a working config.h. Please send any
  10.  * changes to ians@eskimo.com, or rlab-list@eskimo.com.
  11.  */
  12.  
  13. #ifndef _CONFIG_H_
  14. #define _CONFIG_H_
  15.  
  16. #undef HAVE_PIPE
  17.  
  18. /* Machine defines, only the real morphidites go here */
  19. #undef TITAN
  20.  
  21. /*
  22.  * Does the C compiler support const ?
  23.  * If it doesn't then:
  24.  * #define const
  25.  */
  26.  
  27. #undef const
  28.  
  29. /* Standard  C (ANSI) header files */
  30. #define STDC_HEADERS
  31.  
  32. /* Does this system have stdlib.h */
  33. #define HAVE_STDLIB_H
  34. #ifdef HAVE_STDLIB_H
  35. #include <stdlib.h>
  36. #else
  37. #include <malloc.h>
  38. #endif
  39.  
  40. /* Does this system have unistd.h (for chdir()) */
  41. #define HAVE_UNISTD_H
  42. #define HAVE_TIME_H
  43.  
  44. /* Set ANSI compiler features */
  45. #if __STDC__ || TITAN
  46. #define _PROTO(proto)  proto
  47. typedef void *VPTR;
  48. #undef YY_USE_PROTOS
  49. #else
  50. #define _PROTO(proto)  ()
  51. #undef YY_USE_PROTOS
  52. typedef char *VPTR;
  53. #endif  /* __STDC__ */
  54.  
  55. /*
  56.  * If this system does not have a size_t type,
  57.  * then use unsigned int. Else, include the file
  58.  * that defines size_t.
  59.  */
  60.  
  61. #undef size_t
  62. #ifndef size_t
  63. #include <sys/types.h>
  64. #else
  65. typedef unsigned int size_t;
  66. #endif
  67.  
  68. /* 
  69.  * #define HAVE_READLINE 1
  70.  * If you want readline command editing.
  71.  * Also edit the Makefile to add the location
  72.  * and name of the readline library.
  73.  */
  74.  
  75. #undef HAVE_READLINE
  76. #define HAVE_INPUT_EDIT   1
  77.  
  78. /*
  79.  * #define HAVE_RLAB_PLPLOT
  80.  * If you have the PLPLOT library and
  81.  * you wish to use this for plotting data.
  82.  * Also edit the Makefile to add the location
  83.  * and name of the PLPLOT library, and any other
  84.  * support libraries it may need.
  85.  */
  86.  
  87. #define HAVE_RLAB_PLPLOT
  88.  
  89. /* Does this system have dirent.h ? */
  90. #define DIRENT
  91. #ifdef DIRENT
  92. #define HAVE_DIRENT
  93. #else
  94. #undef HAVE_DIRENT
  95. #endif
  96.  
  97. /* If your system has an index(3), and rindex(3) */
  98. #undef HAVE_RINDEX
  99.  
  100. /* If your math library has rint() */
  101. #undef HAVE_RINT
  102. #undef HAVE_RINT_DEC
  103. #ifdef HAVE_RINT
  104. #ifndef HAVE_RINT_DEC
  105. extern double rint();
  106. #endif
  107. #endif
  108.  
  109. /* If your system has a difftime() function */
  110. #define HAVE_DIFFTIME
  111.  
  112. /* This defines the byte significance of your machine */
  113. #define WORDS_BIGENDIAN
  114.  
  115. /*
  116.  * If your system does not have a float.h, then try building, 
  117.  * and running misc/enquire.c. Enquire will generate a suitable 
  118.  * float.h. If you don't have, or can't build a float.h, then you
  119.  * will need to define DBL_EPSILON.
  120.  */
  121.  
  122. #define HAVE_FLOAT_H
  123. #ifndef HAVE_FLOAT_H
  124. #define DBL_EPSILON 2.22e-16
  125. #else
  126. #include <float.h>
  127. #endif
  128.  
  129. /*
  130.  * The width of your terminal. This will be replaced later on.
  131.  */
  132.  
  133. #define TERM_WIDTH 72
  134.  
  135. /*
  136.  * Next you need to tell us which floating point exceptions
  137.  * you want to trap. If you don't know what to do here, then do:
  138.  * `#define FP_SET_MASK ;' Then the defaults will be left alone.
  139.  */
  140.  
  141. #undef HAVE_FPSETMASK
  142. #undef HAVE_IEEEFP_H
  143.  
  144. #ifdef HAVE_FPSETMASK
  145. #ifdef HAVE_IEEEFP_H
  146. #include <ieeefp.h>
  147. #endif
  148. #define FP_SET_MASK  { int mask=fpgetmask();\
  149.         fpsetmask(mask | FP_X_DZ | FP_X_OFL); }
  150. #else
  151. #define FP_SET_MASK ;
  152. #endif
  153.  
  154. /*
  155.  * The following tells RLaB how to handle math library errors.
  156.  * `#undef USE_MATHERR'
  157.  * `#define errcheck( a , b ) errno_check( a , b )'
  158.  * will tell RLaB to check errno after every call to math library
  159.  * functions. This method should work on any UNIX platform.
  160.  *
  161.  * `#define USE_MATHERR'
  162.  * `#define errcheck( a , b )    a'
  163.  * will tell RLaB to use matherr(). This is more efficient, since
  164.  * matherr() is only called when an exception occurs. However
  165.  * matherr() may not be available on BSD-style systems.
  166.  */
  167.  
  168. #define HAVE_MATHERR
  169. #ifdef HAVE_MATHERR
  170. #define errcheck( a , b )    a
  171. #else
  172. #define errcheck( a , b )    errno_check( a , b )
  173. #endif
  174.  
  175. /*
  176.  * Misc defines for systems without declarations
  177.  * in their header files (SUN).
  178.  */
  179.  
  180. #define HAVE_FPRINTF_DEC
  181. #define HAVE_SPRINTF_DEC
  182.  
  183. #endif /* _CONFIG_H_ */
  184.